package org.jeecg.modules.car.mapper;

import java.util.List;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.car.entity.CarParkInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 车场信息表
 * @Author: jeecg-boot
 * @Date:   2019-07-10
 * @Version: V1.0
 */
public interface CarParkInfoMapper extends BaseMapper<CarParkInfo> {

     // 根据项目和车库编号查询是否存在
     String getParkByOrder(@Param("order") String order, @Param("pid") String pid, @Param("cpid") String cpid);

     List<CarParkInfo> getListByProjectId(String projectId);

     List<CarParkInfo> getAllList();

     // 根据项目和车库编号查询对应的车库类
     CarParkInfo getParkByOrderPid(@Param("order") String order, @Param("pid") String pid);

     //查询对应项目下的所有车场信息
     List<CarParkInfo> getParksByPids(@Param("pids") List<String> pids);

     void updateProjectInfo(CarParkInfo carParkInfo);

    CarParkInfo getByProjectIdAndParkName(@Param("projectId") String projectId, @Param("parkName") String parkName);

    List<CarParkInfo> findAllList(Page<CarParkInfo> page, @Param("carParkInfo") CarParkInfo carParkInfo);

    @SqlParser(filter = true)
    CarParkInfo getByOutParkId(@Param("outParkId") String outParkId);

    @SqlParser(filter = true)
    CarParkInfo getByParkId(@Param("parkId") String parkId);

    @SqlParser(filter = true)
    List<CarParkInfo> findShParking();

    @SqlParser(filter = true)
    CarParkInfo getBySuperviseParkId(@Param("superviseParkId") String superviseParkId);
}
